{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "### 将学生的答题数据进行转为整数题号"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [],
   "source": [
    "import pandas as  pd"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2023-07-27T22:29:28.261506Z",
     "end_time": "2023-07-27T22:29:28.266742Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "    0     1     2     3     4     5     6     7     8     9    ...   732  \\\n0  80.0  80.0  80.0  80.0  80.0  82.0  81.0  82.0  42.0  80.0  ...  29.0   \n1  80.0  80.0  80.0  80.0  80.0  82.0  81.0  82.0  42.0  80.0  ...  29.0   \n2  80.0  80.0  80.0  80.0  80.0  82.0  81.0  82.0  42.0  80.0  ...  29.0   \n3  80.0  80.0  80.0  80.0  80.0  82.0  81.0  82.0  42.0  80.0  ...  29.0   \n4  80.0  80.0  80.0  80.0  80.0  82.0  81.0  82.0  42.0  80.0  ...  29.0   \n\n    733   734   735   736    737    738    739    740    741  \n0  92.0  92.0  29.0  23.0  106.0  106.0  106.0  106.0  106.0  \n1  92.0  92.0  29.0  23.0  106.0  106.0  106.0  106.0  106.0  \n2  92.0  92.0  29.0  23.0  106.0  106.0  106.0  106.0  106.0  \n3  92.0  92.0  29.0  23.0  106.0  106.0  106.0  106.0  106.0  \n4  92.0  92.0  29.0  23.0  106.0  106.0  106.0  106.0  106.0  \n\n[5 rows x 742 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>0</th>\n      <th>1</th>\n      <th>2</th>\n      <th>3</th>\n      <th>4</th>\n      <th>5</th>\n      <th>6</th>\n      <th>7</th>\n      <th>8</th>\n      <th>9</th>\n      <th>...</th>\n      <th>732</th>\n      <th>733</th>\n      <th>734</th>\n      <th>735</th>\n      <th>736</th>\n      <th>737</th>\n      <th>738</th>\n      <th>739</th>\n      <th>740</th>\n      <th>741</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>82.0</td>\n      <td>81.0</td>\n      <td>82.0</td>\n      <td>42.0</td>\n      <td>80.0</td>\n      <td>...</td>\n      <td>29.0</td>\n      <td>92.0</td>\n      <td>92.0</td>\n      <td>29.0</td>\n      <td>23.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>82.0</td>\n      <td>81.0</td>\n      <td>82.0</td>\n      <td>42.0</td>\n      <td>80.0</td>\n      <td>...</td>\n      <td>29.0</td>\n      <td>92.0</td>\n      <td>92.0</td>\n      <td>29.0</td>\n      <td>23.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>82.0</td>\n      <td>81.0</td>\n      <td>82.0</td>\n      <td>42.0</td>\n      <td>80.0</td>\n      <td>...</td>\n      <td>29.0</td>\n      <td>92.0</td>\n      <td>92.0</td>\n      <td>29.0</td>\n      <td>23.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>82.0</td>\n      <td>81.0</td>\n      <td>82.0</td>\n      <td>42.0</td>\n      <td>80.0</td>\n      <td>...</td>\n      <td>29.0</td>\n      <td>92.0</td>\n      <td>92.0</td>\n      <td>29.0</td>\n      <td>23.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>80.0</td>\n      <td>82.0</td>\n      <td>81.0</td>\n      <td>82.0</td>\n      <td>42.0</td>\n      <td>80.0</td>\n      <td>...</td>\n      <td>29.0</td>\n      <td>92.0</td>\n      <td>92.0</td>\n      <td>29.0</td>\n      <td>23.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n      <td>106.0</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows × 742 columns</p>\n</div>"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('学生的答题数据.csv',header=None)\n",
    "df.head()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2023-07-27T22:29:28.268761Z",
     "end_time": "2023-07-27T22:29:28.356410Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "    0    1    2    3    4    5    6    7    8    9    ...  732  733  734  735  \\\n0    80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n1    80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n2    80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n3    80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n4    80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n..  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...   \n59   80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n60   80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n61   80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n62   80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n63   80   80   80   80   80   82   81   82   42   80  ...   29   92   92   29   \n\n    736  737  738  739  740  741  \n0    23  106  106  106  106  106  \n1    23  106  106  106  106  106  \n2    23  106  106  106  106  106  \n3    23  106  106  106  106  106  \n4    23  106  106  106  106  106  \n..  ...  ...  ...  ...  ...  ...  \n59   23  106  106  106  106  106  \n60   23  106  106  106  106  106  \n61   23  106  106  106  106  106  \n62   23  106  106  106  106  106  \n63   23  106  106  106  106  106  \n\n[64 rows x 742 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>0</th>\n      <th>1</th>\n      <th>2</th>\n      <th>3</th>\n      <th>4</th>\n      <th>5</th>\n      <th>6</th>\n      <th>7</th>\n      <th>8</th>\n      <th>9</th>\n      <th>...</th>\n      <th>732</th>\n      <th>733</th>\n      <th>734</th>\n      <th>735</th>\n      <th>736</th>\n      <th>737</th>\n      <th>738</th>\n      <th>739</th>\n      <th>740</th>\n      <th>741</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>59</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>60</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>61</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>62</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n    <tr>\n      <th>63</th>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>80</td>\n      <td>82</td>\n      <td>81</td>\n      <td>82</td>\n      <td>42</td>\n      <td>80</td>\n      <td>...</td>\n      <td>29</td>\n      <td>92</td>\n      <td>92</td>\n      <td>29</td>\n      <td>23</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n      <td>106</td>\n    </tr>\n  </tbody>\n</table>\n<p>64 rows × 742 columns</p>\n</div>"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df>124] -=124\n",
    "df.astype(int)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2023-07-27T22:29:28.345706Z",
     "end_time": "2023-07-27T22:29:28.368009Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [],
   "source": [
    "df.to_csv('学生的答题数据2.csv')"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2023-07-27T22:29:28.450271Z",
     "end_time": "2023-07-27T22:29:28.489861Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
